package solution22;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            List<String> list = new ArrayList<>();
            list = new Solution().generateParenthesis(n);
            for (String s : list) {
                System.out.println(s);
            }
        }
    }
}
